<template>
  <div class="card p-3 bg-white mt-3">
    <div class="card-header d-flex ai-center" :class="{'border-bottom': !plain, 'pb-3': !plain}">
      <i class="iconfont fs-lg" :class="`icon-${icon}`"></i>
      <div class="flex-1 px-2 fs-xl">
        <strong>{{title}}</strong>
      </div>
      <i class="iconfont icon-menu"></i>
    </div>
    <div class="card-body">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      tyep: String,
      required: true
    },
    icon: {
      type: String,
      required: true
    },
    plain: { type: Boolean }
  }
};
</script>

<style lang="scss">
@import "~@/assets/scss/variables.scss";
.card {
  border-bottom: 1px solid $border-color;
}
</style>